package com.example.dynamicdatasourcetest.service.impl;

import com.example.dynamicdatasourcetest.datasource.DynamicDataSourceContextHolder;
import com.example.dynamicdatasourcetest.service.DynamicDataSourceService;
import org.springframework.stereotype.Service;

@Service
public class DynamicDataSourceServiceImpl implements DynamicDataSourceService {

    @Override
    public String dataSourceTest(String dataSourceType) {
        DynamicDataSourceContextHolder.setDataSourceType(dataSourceType);

        return dataSourceType;
    }
}
